local pom1, pom2, pomb1, pomb2 = 0, 0, false, false
room:setEffect("zx")
room.pocitadlo = 0
room.uvod = 0
room.nekdy = 100 + random(5000)
room.pixely = 0
room.hra = 0
room.lore = 0
room.premyslis = 0
room.load = 0
room.opakovani = 0
room.tlaci = 0
room.skladat = 0
room.miner = 0
return function()
if no_dialog() and isReady(small) and isReady(big) then
if room.nekdy > 0 then
room.nekdy = room.nekdy - 1
end
room.pocitadlo = room.pocitadlo + 1
if room.uvod == 0 then
room.uvod = 1
switch(pokus){
[1] = function()
pom1 = 1
end,
[2] = function()
pom1 = 2
end,
default = function()
pom1 = random(2) + 1
end,
}
if pom1 == 1 then
addm(random(42) + 9, "zx-m-pametnici")
if pokus < 5 + random(5) or random(100) < 50 then
addv(15, "zx-v-osmibit")
end
else
addv(random(42) + 9, "zx-v-roboti")
addm(9, "zx-m-highway")
end
elseif room.pixely == 0 and room.nekdy == 0 then
room.pixely = 1
addm(9, "zx-m-pixel")
if random(100) < 40 and room.hra == 0 then
room.hra = 1
addv(5, "zx-v-hry")
end
elseif room.hra == 0 and big.dir ~= dir_no and jet.dir ~= dir_no then
room.hra = 1
addv(20 + random(50), "zx-v-hry")
elseif room.premyslis == 0 and big.nehybe_se > 90 and room.pocitadlo > 500 + random(200) then
room.premyslis = 1
addm(0, "zx-m-premyslis")
if room.hra == 0 and random(100) < 25 then
addv(4, "zx-v-hry")
room.hra = 1
else
pom1 = random(6)
if pom1 < 5 then
addv(12, "zx-v-pamet")
end
if pom1 > 1 then
addv(5 + random(4), "zx-v-otazka")
end
if random(5) > 0 then
addm(10 + random(4), "zx-m-necodosebe")
end
end
elseif room.lore == 0 and dist(knightik, small) < 5 and isIn(small.Y, {2, 3, 4}) and not small:isLeft() and random(100) < 20 then
room.lore = 1
addm(9 * random(2), "zx-m-knight")
elseif room.load < 4 and room.pocitadlo > 400 + 200 * room.load + random(200) then
room.load = room.load + 1
if room.load == 1 then
addv(0, "zx-v-nahravani")
elseif random(2) == 0 then
addv(0, "zx-v-nahravani")
end
elseif room.tlaci == 0 and small.dir ~= dir_no and small:getState() == "pushing" and small.tlacit_jeste == 0 then
room.tlaci = 1
addm(5, "zx-m-ocel")
elseif room.skladat == 0 and roompole[2] < 2 and (jet1.dir ~= dir_no or jet2.dir ~= dir_no or jet3.dir ~= dir_no) and small.dir ~= dir_no and random(8) == 0 then
if pokus > 2 and random(100) < 60 then
room.skladat = 1
else
room.skladat = 1
roompole[2] = roompole[2] + 1
addm(9, "zx-m-jetpack")
end
elseif room.miner == 0 and big.dir == dir_no and dist(manic, big) < 6 and random(100) < 8 then
if pokus > 3 and random(100) < 10 + 50 * roompole[1] then